import asyncio

async def main():
    from services.ad936x.handler import Ad936xHandler

    loop = asyncio.get_event_loop()

    handler = Ad936xHandler()
    loop.create_task(handler.model.dcdc_loop())
    loop.create_task(handler.model.digital_tune_loop())
    loop.create_task(handler.model.repare_ad9364_loop())
    loop.create_task(handler.model.repare_dma_loop())
    await handler.receive_messages(loop)


if __name__ == '__main__':
    asyncio.new_event_loop()\
        .run_until_complete(main())

